package com.goodwill.androidtest.genericity;

public class OverLoadTest {
    private int num;

    public static void main(String[] args) {
        eat();
        eat("name");
    }

    //1.方法名相同
    //2.参数列表(参数个数、参数顺序, 参数类型)的情况被称为方法重载
    private static void eat() {



    }

    private static void eat(String name) {

    }

    private static void eat(CharSequence name) {

    }

    private static void eat(String name, int age) {

    }

    private static void eat(int age, String name) {

    }

    public void run() {
        synchronized (this) {
            num++;
        }
    }

    //构造者模式
}
